package com.game.gateway;

import com.game.gateway.messages.GameMessageServerBoot;
import com.game.gateway.netty.ClientNettyServerBoot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class GatewayServerApplication {
	//启动游戏网关服务
	public static void main(String[] args) {
		ApplicationContext applicationContext = SpringApplication.run(GatewayServerApplication.class, args);

		GameMessageServerBoot gameMessageServerBoot = applicationContext.getBean(GameMessageServerBoot.class);
		gameMessageServerBoot.run(applicationContext, args);

		ClientNettyServerBoot clientNettyServerBoot = applicationContext.getBean(ClientNettyServerBoot.class);
		clientNettyServerBoot.start();
	}
}
